Skip to content

Conversation

JordonPhillips
Copy link
Contributor

@JordonPhillips JordonPhillips commented Apr 17, 2025

This updates exceptions to embed necessary retry info. This will allow any layer that has access to the exception to set or utilize it without having to have additional interfaces and hooks.

I included a design doc to explain things in a durable way

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This updates exceptions to embed necessary retry info. This will
allow any layer that has access to the exception to set or utilize
it without having to have additional interfaces and hooks.

This does not modify the retry strategy interface or implementation,
that will come in a follow-up.
@JordonPhillips JordonPhillips marked this pull request as ready for review April 28, 2025 14:53
@JordonPhillips JordonPhillips requested a review from a team as a code owner April 28, 2025 14:53
@JordonPhillips JordonPhillips force-pushed the error-rework branch 2 times, most recently from 7fcec38 to 1fa23bd Compare April 28, 2025 16:02
Copy link
Contributor

@jonathan343 jonathan343 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping some initial comments after reviewing the design doc and python code.

PEP8 prefers that we have "Error" as the suffix for errors, which
makes sense in a world where exceptions are regularly used for
control flow.
Copy link
Contributor

@jonathan343 jonathan343 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I have a few more questions and suggestions

class ModeledError(CallError):
"""Base exception to be used for modeled errors."""

fault: Fault = "client"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why default to "client" instead of None?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modeled errors will always have this defined as the Smithy trait requires it. So this isn't really important either way

Copy link
Contributor

@jonathan343 jonathan343 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@JordonPhillips JordonPhillips merged commit f0c9fbe into develop Apr 30, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants